package com.lry.crawlers.information.service.impl;

import com.lry.crawlers.information.entity.Information;
import com.lry.crawlers.information.mapper.InformationMapper;
import com.lry.crawlers.information.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InformationServiceImpl implements InformationService {
    @Autowired
    InformationMapper informationMapper;
    public int setInformation(Information information) {
        return informationMapper.insert(information);
    }

    public int updateInformation(Information information) {
        return informationMapper.updateById(information);
    }

    public List<Information> selectInformations() {
        return informationMapper.selectInformations();
    }


    @Override
    public int updateCount(String id, String allCount) {
        return informationMapper.upConut(id, allCount);
    }
    @Override
    public int updateCountVideo(String id, String allCount) {
        return informationMapper.upConutVideo(id, allCount);
    }
    @Override
    public Information getById(String id) {
        return informationMapper.selectById(id);
    }
}
